#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{
	int num[10],min,max;
	for(int i=0;i<=9;i++)
		cin>>num[i];
	min=max=num[0];
	for(i=0;i<=9;i++)
	{
		if(num[i]<min)
			min=num[i];
		if(num[i]>max)
			max=num[i];
	}
	cout<<"The min number is "<<min<<endl;
	cout<<"The max number is "<<max<<endl;
	return 0;
}
